grails.servlet.version = "2.5" // Change depending on target container compliance (2.5 or 3.0)
grails.project.class.dir = "target/classes"
grails.project.test.class.dir = "target/test-classes"
grails.project.test.reports.dir = "target/test-reports"
grails.project.target.level = 1.6
grails.project.source.level = 1.6
//grails.project.war.file = "target/${appName}-${appVersion}.war"

grails.project.fork = [
        test   : false,
        run    : [maxMemory: 2048, minMemory: 512, debug: false, maxPerm: 256, forkReserve: false],
        war    : [maxMemory: 768, minMemory: 64, debug: false, maxPerm: 256, forkReserve: false],
        console: [maxMemory: 768, minMemory: 64, debug: false, maxPerm: 256]
]

grails.project.dependency.resolution = {
    String cxfVersion = '3.0.4'
    String jaxbVersion = '2.2.11'
    String springVersion = '4.0.9.RELEASE'
    // inherit Grails' default dependencies
    inherits("global") {
        // specify dependency exclusions here; for example, uncomment this to disable ehcache:
        // excludes 'ehcache'
    }
    log "warn" // log level of Ivy resolver, either 'error', 'warn', 'info', 'debug' or 'verbose'
    checksums true // Whether to verify checksums on resolve
    legacyResolve false
    // whether to do a secondary resolve on plugin installation, not advised and here for backwards compatibility

    repositories {
        inherits true // Whether to inherit repository definitions from plugins

        mavenLocal()
        mavenCentral()
        grailsPlugins()
        grailsHome()
        grailsCentral()
        mavenLocal()
        mavenCentral()
        grailsRepo "https://grails.org/plugins"

        mavenRepo "http://repository.springsource.com/maven/bundles/release"
        mavenRepo "http://repository.springsource.com/maven/bundles/external"
        mavenRepo "http://repo.spring.io/milestone/"
        mavenRepo "http://grails.org/plugins"
        mavenRepo "http://repo.grails.org/grails/libs-releases/"
        mavenRepo "http://repo.spring.io/milestone/"

        // uncomment these (or add new ones) to enable remote dependency resolution from public Maven repositories
        mavenRepo "http://snapshots.repository.codehaus.org"
        mavenRepo "http://repository.codehaus.org"
        mavenRepo "http://download.java.net/maven/2/"
        mavenRepo "http://repository.jboss.com/maven2/"
        mavenRepo "https://github.com/slorber/gcm-server-repository/raw/master/releases/"

    }
    dependencies {
        // specify dependencies here under either 'build', 'compile', 'runtime', 'test' or 'provided' scopes eg.

        //dependency for driver MySQL
        runtime 'mysql:mysql-connector-java:5.1.20'//compile 'mysql:mysql-connector-java:5.1.18'
        // runtime ':json-simple:1.1.1'

//		compile ":twitter-bootstrap:3.1.1"
        //dependency for http

        compile "com.google.android.gcm:gcm-server:1.0.2"


        compile('org.slf4j:slf4j-api:1.7.12') {
        }

        compile('org.codehaus.groovy.modules.http-builder:http-builder:0.5.0') {
            excludes "commons-logging", "xml-apis", "groovy"
        }

        compile("joda-time:joda-time-hibernate:1.3") {
            excludes "joda-time", "hibernate"
        }
        compile('commons-cli:commons-cli:1.2')

             compile("com.sun.xml.bind:jaxb-impl:${jaxbVersion}")

        compile("com.sun.xml.bind:jaxb-xjc:${jaxbVersion}")

        compile("org.springframework:spring-expression:${springVersion}")

        compile("org.springframework:spring-aop:${springVersion}")

        /* Some Testing Help **************************************************/
//        test('org.apache.ws.security:wss4j:1.6.18') {
        /*
        <module>parent</module>
        <module>bindings</module>
        <module>policy</module>
        <module>ws-security-common</module>
        <module>ws-security-dom</module>
        <module>ws-security-stax</module>
        <module>integration</module>
        <module>ws-security-policy-stax</module>
        */
        test('org.apache.wss4j:wss4j-ws-security-stax:2.0.3') {
            excludes 'xmlbeans', 'spring-web', 'spring-core', 'xml-apis', 'junit', 'log4j', 'slf4j', 'slf4j-log4j12', 'slf4j-api', 'slf4j-jdk14'
            export = false
        }

        test('org.apache.wss4j:wss4j-ws-security-dom:2.0.3') {
            excludes 'xmlbeans', 'spring-web', 'spring-core', 'xml-apis', 'junit', 'log4j', 'slf4j', 'slf4j-log4j12', 'slf4j-api', 'slf4j-jdk14'
            export = false
        }

        test('org.apache.wss4j:wss4j-bindings:2.0.3') {
            excludes 'xmlbeans', 'spring-web', 'spring-core', 'xml-apis', 'junit', 'log4j', 'slf4j', 'slf4j-log4j12', 'slf4j-api', 'slf4j-jdk14'
            export = false
        }

        test('org.apache.wss4j:wss4j-policy:2.0.3') {
            excludes 'xmlbeans', 'spring-web', 'spring-core', 'xml-apis', 'junit', 'log4j', 'slf4j', 'slf4j-log4j12', 'slf4j-api', 'slf4j-jdk14'
            export = false
        }


        test("org.gebish:geb-spock:0.10.0") {
            export = false
        }

//        test("com.github.groovy-wslite:groovy-wslite:0.7.2.0") {
//            export = false
//        }

//        test("org.codehaus.geb:geb-spock:${gebVersion}") {
//            export = false
//        }

        test('org.seleniumhq.selenium:selenium-htmlunit-driver:2.25.0') {
            excludes 'xmlbeans', 'spring-web', 'spring-core', 'xml-apis'
            export = false
        }

        test('org.seleniumhq.selenium:selenium-chrome-driver:2.25.0') {
            excludes 'xmlbeans', 'spring-web', 'spring-core', 'xml-apis'
            export = false
        }

        test('org.seleniumhq.selenium:selenium-firefox-driver:2.25.0') {
            excludes 'xmlbeans', 'spring-web', 'spring-core', 'xml-apis'
            export = false
        }

        test("org.grails:grails-datastore-test-support:1.0.2-grails-2.4") {
            export = false
        }


    }

    plugins {
        // plugins for the build system only
        build ":tomcat:7.0.52.1" //build ":tomcat:$grailsVersion"
        // build ":tomcat:8.0.15"

        // plugins for the compile step
        compile ":scaffolding:2.0.2"
        compile ':cache:1.1.1'
        compile ":jquery-file-upload:0.2"
        compile ":bootstrap-file-upload:2.1.2"
        compile ":filterpane:2.3.3"
        compile ":joda-time:1.4"
        compile ":rest-client-builder:2.0.0"
        compile ":jquery-ui:1.10.3"
        compile ":spring-security-core:1.2.7.3"//compile ":spring-security-core:2.0-RC2"

        compile ":cxf:2.1.1" //https://github.com/Grails-Plugin-Consortium/grails-cxf
        compile ":cxf-client:2.1.1" // https://github.com/Grails-Plugin-Consortium/grails-cxf-client#Script

        // runtime ':twitter-bootstrap:2.3.2'
        runtime ':twitter-bootstrap:3.3.1'
        runtime ":database-migration:1.3.8" //runtime ":database-migration:1.1"
        runtime ":hibernate:3.6.10.9" // runtime ":hibernate:$grailsVersion"
        runtime ":jquery:1.11.0.2" //runtime ":jquery:1.8.0"
        runtime ":resources:1.2.7" //runtime ":resources:1.2.14"//
        runtime ":foundation:2.1.4.3"

        // Uncomment these (or add new ones) to enable additional resources capabilities
        //runtime ":zipped-resources:1.0"
        //runtime ":cached-resources:1.0"
        //runtime ":yui-minify-resources:0.1.4"

        //CKeditor web WYSIWYG editor integration plugin.
        // compile ":ckeditor:4.4.1.0"

        test(":wslite:0.7.2.0") {
            export = false
        }

        test(":geb:0.10.0") {
            export = false
        }

        test(":code-coverage:1.2.5") {
            export = false
        }

        test(":codenarc:0.21") {
            export = false
        }

    }
}


coverage {
    xml = true
    exclusions = ['**/*Tests*']
}
